package sessions;

import java.sql.Date;
import java.util.List;

import javax.ejb.Local;

import entities.Admin;
import entities.Skill;
import entities.User;
import exceptions.AdminAuthenticationException;
import exceptions.AuthenticationException;
import exceptions.DuplicatedUsernameException;

@Local
public interface UserManagerLocal {

	public void register(String username, String password, String email,
			String name, String surname, Date birth, String address)
			throws DuplicatedUsernameException;

	public void adminAuthenticate(String username, String password)
			throws AdminAuthenticationException;

	public void authenticate(String username, String password)
			throws AuthenticationException;

	public List<User> search(String username, String name, String surname,
			String address);

	public void edit(String username, String password, String email,
			String name, String surname, Date birth, String address);

	public User fetch(String username);

	public Admin fetchAdmin(String username);

	public List<Skill> fetchDeclaredSkills(String username);

	public void removeAllDeclaredSkills(String username);

	public void declareSkill(User user, Skill skill);

}
